package com.test.service;

import java.io.IOException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.test.po.People;
import com.test.po.PeopleList;

@Service
public class AllService {
	@Autowired
	private PeopleServiceImpl peopleService;
	@Autowired
	private PeopleListServiceImpl peopleListService;
	
	
	public String saveAll(int age,int pid) throws IOException {
		
		People people = new People();
		people.setAge(age);
		peopleService.savePeople(people );
		
		PeopleList peopleList = new PeopleList();
		peopleList.setpId(pid);
		peopleListService.savePeopleList(peopleList );
		return "allSave";
		
	}
}
